Google speech provider
A Google speech provider lets Live Hub use your Google Cloud service account for speech-to-text (STT), text-to-speech (TTS), or both.
Google's advanced configuration parameters can be set at either of two levels:
- Provider level: Enter the parameters in the 'Provider configuration' field. A parameter set on the provider applies to every bot connection that uses the provider.
- Bot connection level: Enter the parameters on the bot connection's Advanced tab. A parameter set on a bot connection applies to that connection only.
If the same parameter is set at both levels, the bot connection value takes precedence.
Add a Google speech provider
To add a Google speech provider:
-
From the 'Google region' drop-down list, select the region.
-
Upload your JSON credentials file. Live Hub fills in 'Client email' and 'Key ID' from it.
See Google's documentation on creating service account keys if you do not have one yet.
-
Optional: Under Advanced, in the 'Provider configuration' field, enter the advanced configuration parameters that apply to every bot connection using this provider. See Configure advanced parameters at the provider level.
-
Click Create.
Configure advanced parameters at the provider level
The JSON you enter in 'Provider configuration' is merged into every request Live Hub sends to Google, so it applies to every bot connection using this provider. The editor validates what you enter against Google's schema, so it flags an unknown parameter or a wrong value type before you save.
Configure advanced parameters at the bot connection level
Google's advanced configuration parameters go under sttPassthruConfig and
ttsPassthruConfig in the JSON editor on the bot connection's Advanced tab, and
Live Hub merges them into the request it sends to Google. See
Manage bot connections.
Speech-to-text
A new provider always uses speech-to-text v2. Only a provider created before v2 became
the default might still use v1. The structure of the speech-to-text parameters depends
on the API version the provider was created with. The full set is
StreamingRecognitionConfig in Google's
v1
or
v2
API documentation.
On v1, the configuration takes this form:
{
"sttPassthruConfig": {
"interimResults": false
}
}
On v2, the same setting is nested and plural:
{
"sttPassthruConfig": {
"streamingFeatures": {
"interimResults": false
}
}
}
Speech-to-Text v2 also supports
recognizers, which are
stored, reusable recognition configurations that you can share across bot connections.
Name one with sttRecognizerId, alongside sttPassthruConfig rather than inside it:
{
"sttRecognizerId": "projects/my-project/locations/global/recognizers/my-recognizer"
}
Text-to-speech
The full set of text-to-speech parameters is SynthesizeSpeechRequest in
Google's TTS API documentation.
{
"ttsPassthruConfig": {
"audioConfig": {
"effectsProfileId": ["telephony-class-application"]
}
}
}
voice.name and voice.modelName have no effect: the voice and the model come from
the bot connection.
Streaming text-to-speech
Setting googleTtsStreaming to true streams the text and the audio at the same time,
which shortens the pause before the caller hears anything. It works only with Google's
Chirp 3 HD and Gemini voices.
When streaming is on, the request is a StreamingSynthesizeConfig rather than a
SynthesizeSpeechRequest: the audio settings go under streamingAudioConfig instead of
audioConfig, alongside advancedVoiceOptions and customPronunciations. The full set
is in
Google's streaming TTS API documentation.
{
"googleTtsStreaming": true,
"ttsPassthruConfig": {
"advancedVoiceOptions": {
"enableTextnorm": true
}
}
}
Language and voice
You select the language and the voice per bot connection, on its Settings tab, not on the provider. See Manage bot connections.